<?php
require_once "ajax.php";
$ajax = ajax();
$ajax->click("btSubmit",$ajax->form("ajax.php?testAjax/formSubmit","frm"));
 
?>
<html>
<head>
<meta charset="UTF-8">
<title>SubmitForm</title>
<?php echo $ajax->init();?>
</head>
<body>
<h2>SubmitForm</h2>
<form id="frm" name="frm" method="post" action="">
    <div><label for="nom">Nom : </label><input type="text" id="nom" name="nom"></div>
    <div><label for="prenom">Prénom : </label><input type="text" id="prenom" name="prenom"></div>
    <input type='submit' id='btSubmit' name='btSubmit' value='Valider'>
</form>
<div id="divResponse"></div>
</body>
</html>